<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <title>OA修改密码</title>

    <!--CSS-->
    <link href="/dist/css/page/login.css" rel="stylesheet"/>

</head>
<body>
<div class="login-container">
    <header class="htmleaf-header">
    </header>
    <div id="wrapper" class="login-page">
        <div id="login_form" class="form">
            <p style="margin-top: 20px;margin-bottom: 30px;color: #222222">
                修改密码</p>
            <form class="login-form">
                <input type="password" placeholder="密码"  id="pwd"/>
                <input type="password" placeholder="确认密码"  id="pwdTest"/>
                <div id="login">确&nbsp;&nbsp;&nbsp;&nbsp;定</div>
            </form>
        </div>
    </div>
</div>
</body>
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<script src="/dist/js/app_iframe.js?t=7e54a132"></script>
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script type="text/javascript">
    $(function () {
        $("#pwdTest").keypress(function (e) {
            if (event.keyCode == 13) {
                event.cancelBubble = true;
                event.returnValue = false;
                $(this).parents("div").find("#login").click();
            }
        });
        $("#login").click(function () {
            var reg = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,18}$/;
            if (!reg.test($('#pwd').val())) {
                alert("请输入6-18位数字字母组合")
                return false;
            }
            if($('#pwd').val()!=$('#pwdTest').val()){
                alert("俩次输入的密码不一致，请从新设置")
                return false;
            }

            var data = {
                pwd: $('#pwd').val(),
                id: $.wyui.page.urlParams.id,
                updateUserId:$.wyui.page.urlParams.id
            };
            $.wyui.postMethod(urlConfig.system.user.saveUser,data,function (r) {
                alert("修改成功")
                location.href = "login.html";
            });
        });
    });
</script>
</html>
